# -*- encoding: utf-8 -*-
# Python 3.9.6 64bit
'''
@File        : AboutDialog.py
@Time        : 2022/01/09 19:47
@Author      : Wreng
@Description : “关于”对话框
@Other       : version - Python 3.9.6 64bit, wxPython 4.1.1
'''

import wx
import wx.html

class AboutDialog(wx.Dialog):
    
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, 'About Sketch', size=(440, 400))
        html= wx.html.HtmlWindow(self)
        html.SetFont( wx.Font( 9, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
        html.LoadFile('.\\assets\\about.html')
        
        button = wx.Button(self, wx.ID_OK, "Okay")

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(html, 1, wx.EXPAND|wx.ALL, 5)
        sizer.Add(button, 0, wx.ALIGN_CENTER|wx.ALL, 5)

        self.SetSizer(sizer)
        self.Layout()